#include <iostream>
using namespace std;

int getSum(int a, int b) {
  int res1 = a ^ b;
  int res2 = a & b;
  res2 <<= 1;
  while (res2 != 0) {
    int restmp1 = res1 ^ res2;
    int restmp2 = (res1 & res2) << 1;
    res1 = restmp1;
    res2 = restmp2;
  }
  return res1;
}

int main(int argc, char *argv[]) {
  cout << getSum(-1, -2)<<endl;
  return 0;
}
